package com.zrrd.learn.chapter01.Game;

/**
 * 鸠摩智
 *
 * @author asus
 * @version 1.0
 * @date 2023/8/15 17:20
 */
public class Zhi {

    private String name;
    private int blood;
    private int attack;
    private int defense;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setBlood(int blood){
        this.blood=blood;

    }

    public int getBlood(){
        return blood;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getAttack() {
        return attack;
    }

    public void setDefense(int defense) {
        this.defense = defense;
    }

    public int getDefense() {
        return defense;
    }

    public String name() {
        name = "鸠摩智";
        return name;
    }

    public int blood() {
        blood = 903;
        return blood;
    }
    public int attack(){
        attack=30;
        return attack;
    }

    public int defense(){
        defense=5;
        return defense;
    }


    /**
     * 攻击
     */
    int num = 0;
    public int attacked(int blood,int attack,int defense){
        //返回剩余血量
        if(num==1){
            return blood+defense;
        }else if(num==3){
            return blood+3;
        }
        return blood-attack;
    }


}
